# -*- coding: utf-8 -*-

"""
工具库：测试
"""

import os
import sys

CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SCRIPTS_DIR = os.path.dirname(CURRENT_DIR)
PROJECT_DIR = os.path.dirname(SCRIPTS_DIR)

sys.path.insert(0, SCRIPTS_DIR)

import utils


def test_utils_gitmodules_parse():
    """ test utils.gitmodules.parse """
    books = utils.gitmodules.parse(git_root=PROJECT_DIR, ignores='scripts')
    print books


def main():
    """ main """
    import constants
    test_utils_gitmodules_parse()
    utils.printj(utils.structure_define.parse(constants.BOOKS))
    utils.printj(utils.structure_define.get_names(constants.BOOKS))


if __name__ == '__main__':
    main()
